package com.ls.product.client;

import com.ls.common.entity.Result;
import com.ls.product.pojo.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(name = "ls-product", path = "/product")
public interface ProductFeignClient {

    @GetMapping("/{id}")
    public Result<Product> getProduct(@PathVariable Integer id);

    @PutMapping("/updateStock/{id}")
    public Result<Integer> updateProduct(@PathVariable Integer id);
}
